<template>
	<view class="container">
		<!-- 轮播图开始 -->
		<view class="carousel-container">
			<swiper class="swiper" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="500">
				<swiper-item v-for="(item, index) in swiperImages" :key="index">
					<image :src="item" class="swiper-image" />
				</swiper-item>
			</swiper>
		</view>
		<!-- 轮播图结束 -->

		<!-- 页面其他内容 -->
		<view class="other-content">
			<!-- 这里放置页面的其他内容 -->
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				// 轮播图图片数组
				swiperImages: [
					'https://web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
					'https://s1.1zoom.me/b7038/Iceland_Rivers_Coast_Sky_Scenery_Sun_Clouds_Grass_552470_225x300.jpg',
					'https://u8.iqiyipic.com/image/20240227/3f/1b/pv_3051940240363800_d_601_480_270.jpg'
				]
			};
		}
	};
</script>
<style scoped>
	.container {
		display: flex;
		flex-direction: column;
	}

	.carousel-container {
		width: 100%;
		height: 200px;
		/* 设置轮播图的高度 */
	}

	.swiper {
		width: 100%;
		height: 100%;
	}

	.swiper-image {
		width: 100%;
		height: 100%;
		object-fit: cover;
		/* 确保图片按比例缩放以填满容器 */
	}
</style>